<template>
	<view class="white">
		<u-navbar :is-back="false" :border-bottom="false" :background="{ background: '#fff' }">
			<view class="slot-wrap flex align-center">
				<text class="cuIcon-back" @click="Back"></text>
				公司介绍
			</view>
		</u-navbar>
		<view class="main">
			<image src="../../static/images/gongshi-img.png" mode="aspectFill" @click="multiRedirect('/pages/details/details')"></image>
			<view class="u-flex justify-between">
				<view class="">
					<view class="u-font-30 text-bold">
						中华墨坊公司介绍
					</view>
					<view class="u-font-24">
						带你走进中华墨坊
					</view>
				</view>
				<view class="cu-btn round bg-orange" @click="multiRedirect('/pages/details/details')">
					查看
				</view>
			</view>
		</view>
		<view class="main">
			<image src="../../static/images/gongshi-img.png" mode="aspectFill" @click="multiRedirect('/pages/details/details')"></image>
			<view class="u-flex justify-between">
				<view class="">
					<view class="u-font-30 text-bold">
						中华墨坊公司介绍
					</view>
					<view class="u-font-24">
						带你走进中华墨坊
					</view>
				</view>
				<view class="cu-btn round bg-orange" @click="multiRedirect('/pages/details/details')">
					查看
				</view>
			</view>
		</view>
		<view class="icon">
			<button class="cu-btn" open-type="contact" style="padding: 0;border-radius: 50%;">
				<image src="../../static/images/icon1.png" mode="aspectFill"></image>
			</button>
			<view class="" @click="multiRedirect('/pages/cart/cart&switch')">
				<image src="../../static/images/icon2.png" mode="aspectFill"></image>
			</view>
			<view class="">
				<image src="../../static/images/icon3.png" mode="aspectFill"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		onLoad() {

		},
		methods: {
			Back() {
				uni.navigateBack({});
			},
			//页面跳转
			multiRedirect(url) {
				if (url && url.length > 0) {
					console.log('+++++', url.indexOf('http'))
					if (url.indexOf('http') === 0) {
						// #ifdef H5 
						location.href = url
						// #endif
						// #ifdef MP-WEIXIN
						uni.navigateTo({
							url: '/pages/web/web?url=' + encodeURIComponent(url)
						})
						// #endif
						// #ifdef APP-PLUS
						plus.runtime.openURL(url, function(res) {
							console.log(res);
						});
						// #endif
					} else if (url.indexOf('&switch') > -1) {
						url = url.substring(0, url.indexOf('&switch'))
						console.log(3434, url)
						uni.switchTab({
							url: url
						})
					} else {
						console.log("挑起", url)
						uni.navigateTo({
							url
						})
					}
				}
			},
		}
	}
</script>

<style lang="scss">
	.main{
		padding: 35rpx 30rpx;
		image{
			width: 690rpx;
			height: 409rpx;
			border-radius: 10rpx;
		}
		.u-flex {
			margin: 30rpx 20rpx 0;
		
			.u-font-30 {
				color: #333;
				margin-right: 10rpx;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 2;
			}
		
			.u-font-24 {
				color: #999;
				margin-top: 20rpx;
			}
		
			.cu-btn {
				width: 113rpx;
				height: 60rpx;
				font-size: 24rpx;
			}
		}
	}
	.icon{
		position: fixed;
		bottom: 80rpx;
		right: 30rpx;
		image{
			width: 100rpx;
			height: 100rpx;
			border-radius: 50%;
			margin-top: 25rpx;
			box-shadow: 0rpx 0rpx 10rpx #888888;
		}
		
	}
</style>
